#ifndef BUTTON_H
#define BUTTON_H

#include <QMouseEvent>
#include <QPushButton>
#include <Maestro/mcplugins.h>

/**
  * The Button class extends QPushbotton and is primarily designed to send a signal when the mouse enters it for selection purposes
  */
class Button : public QPushButton
{
    Q_OBJECT
public:
    Button(QIcon icon, QString string, QWidget * parent);
    Button(QIcon icon, QString string, QWidget * parent, QObject * item);
    Button();
    QObject * getItem() { return item;}
    void setItem(QObject * item);
    void setIconSize(const QSize &size);
protected:
    void enterEvent(QEvent *e);
    void mousePressEvent ( QMouseEvent * e );
signals:
    void mouseEntered(Button * button);
    void rightClicked();
private:
    QObject * item;
};

#endif // BUTTON_H
